/*
 * @Author: luosi 1297957337@qq.com
 * @Date: 2024-11-25 09:28:46
 * @LastEditors: luosi 1297957337@qq.com
 * @LastEditTime: 2024-12-03 09:06:23
 * @FilePath: \sr_system_manager_ui\src\api\assessment\index.ts
 * @Description: 考核奖励
 */
import request from '@/utils/request'
import {
  AssessmentCreateReqDTO,
  BaseSuccessRespDTO,
  BaseIdReqDTO,
  AssessmentPageQuery,
  PageBeanAssessmentPageRespVO,
  AssessmentUpdateReqDTO,
  AssessmentUpdateStatusReqDTO,
  RewardCreateReqDTO,
  AssessmentDetailVO,
  RewardPageQuery,
  PageBeanRewardPageRespVO,
  RewardUpdateReqDTO,
  RewardUpdateStatusReqDTO,
  RewardMethodCreateReqDTO,
  RewardMethodCalculationReqDTO,
  RewardMethodDetailRespVO,
  RewardMethodCalculationListRespVO,
  RewardMethodPageQuery,
  RewardMethodListRespVO,
  RewardMethodCalculationListQuery,
  PageBeanRewardMethodPageRespVO,
  RewardMethodUpdateReqDTO,
  RewardMethodCalculationUpdateReqDTO,
  AssessmentMethodCreateReqDTO,
  AssAssessmentMethodCalculationReqDTO,
  AssessmentMethodCalculationListRespVO,
  AssessmentMethodDetailRespVO,
  AssessmentMethodPageQuery,
  AssessmentMethodListRespVO,
  AssessmentMethodCalculationListQuery,
  PageBeanAssessmentMethodPageRespVO,
  AssessmentMethodUpdateReqDTO,
  AssessmentMethodCalculationUpdateReqDTO,
  AssessmentMethodUpdateStatusReqDTO,
  RewardDetailVO,
  MyResearchRewardPageReqOpenDTO,
  PageBeanMyResearchRewardVO,
} from './types'

const baseUrl = ''

// 科研考核  创建
export function assessmentCreate(data: AssessmentCreateReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/create`,
    method: 'post',
    data
  })
}

// 科研考核  删除
export function assessmentDelete(data: BaseIdReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/delete`,
    method: 'post',
    data
  })
}

// 科研考核  详情
export function assessmentDetail(data: BaseIdReqDTO) {
  return request<AssessmentDetailVO>({
    url: `${baseUrl}/assessment/api/assessment/detail`,
    method: 'post',
    data
  })
}

// 科研考核  分页
export function assessmentPage(data: AssessmentPageQuery) {
  return request<PageBeanAssessmentPageRespVO>({
    url: `${baseUrl}/assessment/api/assessment/page`,
    method: 'post',
    data
  })
}

// 科研考核  更新
export function assessmentUpdate(data: AssessmentUpdateReqDTO) {
  return request<PageBeanAssessmentPageRespVO>({
    url: `${baseUrl}/assessment/api/assessment/update`,
    method: 'post',
    data
  })
}

// 管理办法  引用上一次
export function assessmentMethodCopy(data: BaseIdReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/method/copy`,
    method: 'post',
    data
  })
}

// 管理办法  新增
export function assessmentMethodCreate(data: AssessmentMethodCreateReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/method/create`,
    method: 'post',
    data
  })
}

// 管理办法  新增考核标准
export function assessmentMethodCreateAssessmentCalculation(data: AssAssessmentMethodCalculationReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/method/createAssessmentCalculation`,
    method: 'post',
    data
  })
}

// 管理办法  删除
export function assessmentMethodDelete(data: BaseIdReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/method/delete`,
    method: 'post',
    data
  })
}

// 管理办法  删除考核标准
export function assessmentMethodDeletedAssessmentCalculation(data: BaseIdReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/method/deleteAssessmentCalculation`,
    method: 'post',
    data
  })
}

// 管理办法  详情
export function assessmentMethodDetail(data: BaseIdReqDTO) {
  return request<AssessmentMethodDetailRespVO>({
    url: `${baseUrl}/assessment/api/assessment/method/detail`,
    method: 'post',
    data
  })
}

// 管理办法  考核标准详情
export function assessmentMethodDetailAssessmentCalculation(data: BaseIdReqDTO) {
  return request<AssessmentMethodCalculationListRespVO>({
    url: `${baseUrl}/assessment/api/assessment/method/detailAssessmentCalculation`,
    method: 'post',
    data
  })
}

// 管理办法  列表
export function assessmentMethodList(data: AssessmentMethodPageQuery) {
  return request<AssessmentMethodListRespVO[]>({
    url: `${baseUrl}/assessment/api/assessment/method/list`,
    method: 'post',
    data
  })
}

// 管理办法  查询考核标准
export function assessmentMethodListAssessmentCalculation(data: AssessmentMethodCalculationListQuery) {
  return request<AssessmentMethodCalculationListRespVO[]>({
    url: `${baseUrl}/assessment/api/assessment/method/listAssessmentCalculation`,
    method: 'post',
    data
  })
}

// 管理办法  分页
export function assessmentMethodPage(data: AssessmentMethodPageQuery) {
  return request<PageBeanAssessmentMethodPageRespVO>({
    url: `${baseUrl}/assessment/api/assessment/method/page`,
    method: 'post',
    data
  })
}

// 管理办法  更新
export function assessmentMethodUpdate(data: AssessmentMethodUpdateReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/method/update`,
    method: 'post',
    data
  })
}

// 管理办法  更新考核标准
export function assessmentMethodUpdateAssessmentCalculation(data: AssessmentMethodCalculationUpdateReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/method/updateAssessmentCalculation`,
    method: 'post',
    data
  })
}

// 管理办法  更新状态
export function assessmentMethodUpdateStatus(data: AssessmentMethodUpdateStatusReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/method/updateStatus`,
    method: 'post',
    data
  })
}

// 科研考核  更新状态
export function assessmentUpdateStatus(data: AssessmentUpdateStatusReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/assessment/updateStatus`,
    method: 'post',
    data
  })
}


// 科研奖励  创建
export function rewardCreate(data: RewardCreateReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/create`,
    method: 'post',
    data
  })
}

// 科研奖励  删除
export function rewardDelete(data: BaseIdReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/delete`,
    method: 'post',
    data
  })
}

// 科研奖励  详情
export function rewardDetail(data: BaseIdReqDTO) {
  return request<RewardDetailVO>({
    url: `${baseUrl}/assessment/api/reward/detail`,
    method: 'post',
    data
  })
}

// 科研奖励  分页
export function rewardPage(data: RewardPageQuery) {
  return request<PageBeanRewardPageRespVO>({
    url: `${baseUrl}/assessment/api/reward/page`,
    method: 'post',
    data
  })
}

// 科研奖励  更新
export function rewardUpdate(data: RewardUpdateReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/update`,
    method: 'post',
    data
  })
}

// 科研奖励  更新状态
export function rewardUpdateStatus(data: RewardUpdateStatusReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/updateStatus`,
    method: 'post',
    data
  })
}

// 奖励办法  引用上一次
export function rewardMethodCopy(data: BaseIdReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/method/copy`,
    method: 'post',
    data
  })
}

// 奖励办法  创建
export function rewardMethodCreate(data: RewardMethodCreateReqDTO) {
  return request<string>({
    url: `${baseUrl}/assessment/api/reward/method/create`,
    method: 'post',
    data
  })
}

// 奖励办法  新增奖励标准
export function rewardMethodCreateRewardCalculation(data: RewardMethodCalculationReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/method/createRewardCalculation`,
    method: 'post',
    data
  })
}

// 奖励办法  删除奖励
export function rewardMethodDelete(data: BaseIdReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/method/delete`,
    method: 'post',
    data
  })
}

// 奖励办法  删除奖励标准
export function rewardMethodDeleteRewardCalculation(data: BaseIdReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/method/deleteRewardCalculation`,
    method: 'post',
    data
  })
}

// 奖励办法  详情
export function rewardMethodDetail(data: BaseIdReqDTO) {
  return request<RewardMethodDetailRespVO>({
    url: `${baseUrl}/assessment/api/reward/method/detail`,
    method: 'post',
    data
  })
}

// 奖励办法  奖励标准详情
export function rewardMethodDetailRewardCalculation(data: BaseIdReqDTO) {
  return request<RewardMethodCalculationListRespVO>({
    url: `${baseUrl}/assessment/api/reward/method/detailRewardCalculation`,
    method: 'post',
    data
  })
}

// 奖励办法  列表
export function rewardMethodList(data: RewardMethodPageQuery) {
  return request<RewardMethodListRespVO[]>({
    url: `${baseUrl}/assessment/api/reward/method/list`,
    method: 'post',
    data
  })
}

// 奖励办法  查询奖励标准
export function rewardMethodListRewardCalculation(data: RewardMethodCalculationListQuery) {
  return request<RewardMethodCalculationListRespVO[]>({
    url: `${baseUrl}/assessment/api/reward/method/listRewardCalculation`,
    method: 'post',
    data
  })
}

// 奖励办法  分页
export function rewardMethodPage(data: RewardMethodPageQuery) {
  return request<PageBeanRewardMethodPageRespVO>({
    url: `${baseUrl}/assessment/api/reward/method/page`,
    method: 'post',
    data
  })
}

// 奖励办法  更新奖励
export function rewardMethodUpdate(data: RewardMethodUpdateReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/method/update`,
    method: 'post',
    data
  })
}

// 奖励办法  更新奖励标准
export function rewardMethodUpdateRewardCalculation(data: RewardMethodCalculationUpdateReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/method/updateRewardCalculation`,
    method: 'post',
    data
  })
}

// 奖励办法  更新状态
export function rewardMethodUpdateStatus(data: RewardMethodCalculationUpdateReqDTO) {
  return request<BaseSuccessRespDTO>({
    url: `${baseUrl}/assessment/api/reward/method/updateStatus`,
    method: 'post',
    data
  })
}


// 查询我的奖励分或科研分、分页
export function myResearchRewardListRep(data: MyResearchRewardPageReqOpenDTO) {
  return request<PageBeanMyResearchRewardVO>({
    url: `/achv/common/myResearchRewardList`,
    method: 'post',
    data
  })
}

// 考核更新提示
export function assessmentTips() {
  return request<boolean>({
    url: '/assessment/api/assessment/method/assessmentTips',
    method: 'get'
  })
}

